WatershedComponents
WatershedComponents[image] computes the watershed transform of image, returning the result as an array in which positive integers label the catchment basins.
WatershedComponents[image,marker] uses a binary image marker to indicate regions where basins may be created.
WatershedComponents[video,…] computes watershed segmentation on frames of video.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.